package common.util
{
	import common.util.SystemUtil;
	
	import mx.core.FlexGlobals;
	import mx.utils.URLUtil;

	public class ImageUtil {
//********************************地图上**************************************************************
		//地图上人员离线状态
		[Embed(source="resources/image/state/map_offline.png")] 
		private static var mapOfflineClass:Class;
		private static var mapOfflinePath:String = "resources/image/state/map_offline.png";
		
		//地图上人员在途中状态
		[Embed(source="resources/image/state/map_onway.png")] 
		private static var mapOnwayClass:Class;
		private static var mapOnwayPath:String = "resources/image/state/map_onway.png";
		
		//地图上人员在工作岗位状态
		[Embed(source="resources/image/state/map_onwork.png")] 
		private static var mapOnworkClass:Class;
		private static var mapOnworkPath:String = "resources/image/state/map_onwork.png";
		
		//地图上起点
		[Embed(source="resources/image/map/startpoint.png")] 
		private static var startClass:Class;
		private static var startPath:String = "resources/image/map/startpoint.png";
		
		//地图上终点
		[Embed(source="resources/image/map/endpoint.png")] 
		private static var endClass:Class;
		private static var endPath:String = "resources/image/map/endpoint.png";
		
		//脚印
		[Embed(source="resources/image/map/footprint.png")]
		private static var footprintClass:Class;
		private static var footprintPath:String = "resources/image/map/footprint.png";
		
		//标注点
		[Embed(source="resources/image/map/pointer.png")]
		private static var pointerClass:Class;
		private static var pointerPath:String = "resources/image/map/pointer.png";
		
		
//********************************树上**************************************************************		
		//树上人员离线状态
		[Embed(source="resources/image/state/tree_offline.png")] 
		private static var treeOfflineClass:Class;
		private static var treeOfflinePath:String = "resources/image/state/tree_offline.png";
		
		//树上人员在途中状态
		[Embed(source="resources/image/state/tree_onway.png")] 
		private static var treeOnwayClass:Class;
		private static var treeOnwayPath:String = "resources/image/state/tree_onway.png";
		
		//树上人员在工作岗位状态
		[Embed(source="resources/image/state/tree_onwork.png")] 
		private static var treeOnworkClass:Class;
		private static var treeOnworkPath:String = "resources/image/state/tree_onwork.png";
		
		//部门图标
		[Embed(source="resources/image/map/showcompany.png")]
		private static var treeDepClass:Class;
		private static var treeDepPath:String = "resources/image/map/showcompany.png";
		//员工图标
		[Embed(source="resources/image/tree/staff.png")]
		private static var treeStaffClass:Class;
		private static var treeStaffPath:String = "resources/image/tree/staff.png";
		
		//客户图标
		[Embed(source="resources/image/tree/client.png")]
		private static var clientClass:Class;
		private static var clientPath:String = "resources/image/tree/client.png";
		
		//空白图标
		[Embed(source="resources/image/blank.gif")]
		private static var blankClass:Class;
		private static var blankPath:String = "resources/image/blank.gif";

		//行政区域树节点图标
		[Embed(source="resources/image/tree/area_p.png")]
		private static var area_pClass:Class;
		private static var area_pPath:String = "resources/image/tree/area_p.png";
		
		//行政区域树节点图标
		[Embed(source="resources/image/tree/area_c.png")]
		private static var area_cClass:Class;
		private static var area_cPath:String = "resources/image/tree/area_c.png";
		
		//电子围栏分类图标
		[Embed(source="resources/image/tree/enclosureDir.png")]
		private static var treeEnclosureDirClass:Class;
		private static var treeEnclosureDirPath:String = "resources/image/tree/enclosureDir.png";
		
		//电子围栏图标
		[Embed(source="resources/image/tree/enclosure.png")]
		private static var treeEnclosureClass:Class;
		private static var treeEnclosurePath:String = "resources/image/tree/enclosure.png";
		
		//定位按钮图标
		[Embed(source="resources/image/map/location.png")] 
		private static var locationClass:Class;
		
		[Embed(source="resources/image/tree/folder.gif")]
		private static var folderClass:Class;
		
		[Embed(source="resources/image/button/refresh.png")]
		private static var refreshClass:Class;
		[Embed(source="resources/image/button/addtype.png")]
		private static var addtypeClass:Class;
		[Embed(source="resources/image/button/addclient.png")]
		private static var addclientClass:Class;
		[Embed(source="resources/image/button/modify.png")]
		private static var modifyClass:Class;
		[Embed(source="resources/image/button/clear.png")]
		private static var clearClass:Class;
		[Embed(source="resources/image/button/add2.png")]
		private static var add2Class:Class;
		[Embed(source="resources/image/map/tool/ruler.png")]
		private static var rulerClass:Class;
		[Embed(source="resources/image/map/tool/gps.png")]
		private static var gpsClass:Class;
		[Embed(source="resources/image/map/tool/clear.png")]
		private static var clear1Class:Class;
		[Embed(source="resources/image/map/showclient.png")]
		private static var client1Class:Class;
		[Embed(source="resources/image/map/showcompany.png")]
		private static var companyClass:Class;
		
		[Embed(source="resources/image/button/export.png")]
		private static var exportClass:Class;
		[Embed(source="resources/image/button/download.png")]
		private static var downloadClass:Class;
		[Embed(source="resources/image/button/import.png")]
		private static var importClass:Class;
		[Embed(source="resources/image/main/pulldown.png")]
		private static var pulldownClass:Class;
		
		[Embed(source="resources/image/button/reset.png")]
		private static var resetClass:Class;
		[Embed(source="resources/image/button/saveIcon.png")]
		private static var saveClass:Class;
		[Embed(source="resources/image/button/send.png")]
		private static var sendClass:Class;
		
		
		//行政区域树节点图标
		[Embed(source="resources/image/button/cancel.png")]
		private static var cancelClass:Class;
		private static var cancelPath:String = "resources/image/button/cancel.png";
		
		
		//报警图标
		[Embed(source="/resources/swf/alarm.swf")]
		[Bindable] private static  var alarmIconClass:Class;
		[Embed(source="/resources/image/alarm/red.png")]
		[Bindable] private static  var alarmIconRedClass:Class;
		[Embed(source="/resources/image/alarm/yellow.png")]
		[Bindable] private static  var alarmIconYellowClass:Class;
		[Embed(source="/resources/image/alarm/light.png")]
		[Bindable] private static  var lightIconClass:Class;
		[Embed(source="/resources/image/alarm/on.png")]
		[Bindable] private static  var alarmVoiceOnClass:Class;
		[Embed(source="/resources/image/alarm/off.png")]
		[Bindable] private static  var alarmVoiceOffClass:Class;
		
		[Embed(source="resources/sound/alarm.mp3")]
		[Bindable] private static var  AlarmVoiceClass:Class;
		
		
		//type: class返回Class   path返回路径
		public static function get(name:String,type:String='class'):Object{
			if(type == 'path'){
				return SystemUtil.getWebUrl().concat(ImageUtil[name+'Path']);
			}else{
				return ImageUtil[name+'Class'];
			}
		}
		
	}
}